//
//  CaseDetailCell.m
//  e律师
//
//  Created by 韦淋 on 2017/5/16.
//  Copyright © 2017年 test. All rights reserved.
//

#import "CaseDetailCell.h"

@implementation CaseDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initalizeInterface];
    }
    return self;
}
- (void)initalizeInterface{
    [self.contentView addSubview:self.bgView];
    [self.bgView addSubview:self.lineView];
    [self.bgView addSubview:self.titleImageView];
    [self.bgView addSubview:self.titleLable];
    [self.bgView addSubview:self.arrowImageView];
}
- (void)layoutSubviews{
    self.bgView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
    self.lineView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, 1);
    self.titleImageView.frame = CGRectMake(20, 15, 20, 20);
    self.titleLable.frame = CGRectMake(60, 5, 300, 40);
    self.arrowImageView.frame = CGRectMake(330, 15, 30, 20);
}
- (UIView *)bgView{
    if (!_bgView) {
        _bgView = [[UIView alloc] init];
        _bgView.backgroundColor = [UIColor colorWithRed:248.0f/255.0f green:248.0f/255.0f blue:248.0f/255.0f alpha:1.0f];
    }
    return _bgView;
}
- (UIView *)lineView{
    if (!_lineView) {
        _lineView = [[UIView alloc] init];
        _lineView.backgroundColor = [UIColor colorWithRed:238.0f/255.0f green:238.0f/255.0f blue:238.0f/255.0f alpha:1.0f];
    }
    return _lineView;
}
- (UIImageView *)titleImageView{
    if (!_titleImageView) {
        _titleImageView = [[UIImageView alloc] init];
    }
    return _titleImageView;
}
- (UILabel *)titleLable{
    if (!_titleLable) {
        _titleLable = [[UILabel alloc]init];
        _titleLable.textColor = [UIColor blackColor];
        _titleLable.font = [UIFont systemFontOfSize:13];
    }
    return _titleLable;
}
- (UIImageView *)arrowImageView{
    if (!_arrowImageView) {
        _arrowImageView = [[UIImageView alloc] init];
//        _arrowImageView.backgroundColor = [UIColor redColor];
        _arrowImageView.image = [UIImage imageNamed:@"箭头"];
    }
    return _arrowImageView;
}
@end
